<template>
  <div>
    <h1>Two</h1>
    <h2>{{count}}</h2>
    <button @click="$forceUpdate()">强制更新</button>
    <button @click="changeA">更新a</button>
  </div>
</template>
<script>
var b = 1;
var a = [1]
export default {
  name: 'Two',
  data() {
        return {
            count:a
        };
    },
    methods:{
      changeA(){
        b++,
        a.push(b)
      }
    },
    mounted() {
        console.log("One");
    },
    updated() {
    console.log("updated");
  },
}
</script>

<style scoped>
</style>
